// information list modal
var app = angular.module('app');

app.factory('informationListModalService', ['$modal', '$q', function ($modal, $q) {
    var informationListModalService = {};

    informationListModalService.show = function (size) {
        size = size || 'lg';
        var deferred = $q.defer();
        var instance = $modal.open({
            templateUrl: 'tpl/modal/informationListModal.html',
            controller: 'informationListModalCtrl',
            size: size,
            backdrop: 'static'
        });

        instance.result.then(function (informations) {
            deferred.resolve(informations);
        }, function () {
            deferred.reject();
        });

        return deferred.promise;
    };

    return informationListModalService;
}]);
